<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SkyGameEngine2d: SkyEngine2d::Texture2D类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="shpe.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">SkyGameEngine2d
   &#160;<span id="projectnumber">1.0.3</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>SkyEngine2d</b></li><li class="navelem"><a class="el" href="class_sky_engine2d_1_1_texture2_d.html">Texture2D</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pub-static-methods">静态 Public 成员函数</a> &#124;
<a href="#pro-methods">Protected 成员函数</a> &#124;
<a href="#friends">友元</a> &#124;
<a href="class_sky_engine2d_1_1_texture2_d-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">SkyEngine2d::Texture2D类 参考</div>  </div>
</div><!--header-->
<div class="contents">

<p>2D纹理  
 <a href="class_sky_engine2d_1_1_texture2_d.html#details">更多...</a></p>

<p><code>#include &lt;<a class="el" href="_texture2_d_8h_source.html">Texture2D.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:ae4c466f94551bf53b7bd62e2499f4bf0"><td class="memItemLeft" align="right" valign="top"><a id="ae4c466f94551bf53b7bd62e2499f4bf0"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sky_engine2d_1_1_texture2_d.html#ae4c466f94551bf53b7bd62e2499f4bf0">~Texture2D</a> ()</td></tr>
<tr class="memdesc:ae4c466f94551bf53b7bd62e2499f4bf0"><td class="mdescLeft">&#160;</td><td class="mdescRight">析构器 <br /></td></tr>
<tr class="separator:ae4c466f94551bf53b7bd62e2499f4bf0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4314457f37876bfd38036f51e97eb681"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="class_sky_engine2d_1_1_size.html">Size</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sky_engine2d_1_1_texture2_d.html#a4314457f37876bfd38036f51e97eb681">getContentSize</a> () const</td></tr>
<tr class="memdesc:a4314457f37876bfd38036f51e97eb681"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取纹理的尺寸  <a href="#a4314457f37876bfd38036f51e97eb681">更多...</a><br /></td></tr>
<tr class="separator:a4314457f37876bfd38036f51e97eb681"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1b637535dd17079d4b795a13fe689c49"><td class="memItemLeft" align="right" valign="top">D3dShaderResourceViewComPtr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sky_engine2d_1_1_texture2_d.html#a1b637535dd17079d4b795a13fe689c49">getD3dShaderResourceView</a> ()</td></tr>
<tr class="memdesc:a1b637535dd17079d4b795a13fe689c49"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取 ID3D11ShaderResourceView 对象  <a href="#a1b637535dd17079d4b795a13fe689c49">更多...</a><br /></td></tr>
<tr class="separator:a1b637535dd17079d4b795a13fe689c49"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1b794103412b7a8fe244707abc83f702"><td class="memItemLeft" align="right" valign="top">D3dResourceComPtr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sky_engine2d_1_1_texture2_d.html#a1b794103412b7a8fe244707abc83f702">getD3dResourceComPtr</a> ()</td></tr>
<tr class="memdesc:a1b794103412b7a8fe244707abc83f702"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取 ID3D11Resource 对象  <a href="#a1b794103412b7a8fe244707abc83f702">更多...</a><br /></td></tr>
<tr class="separator:a1b794103412b7a8fe244707abc83f702"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
静态 Public 成员函数</h2></td></tr>
<tr class="memitem:a51efae0b241af880021163b352fa3db6"><td class="memItemLeft" align="right" valign="top">static Texture2DSharedPtr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sky_engine2d_1_1_texture2_d.html#a51efae0b241af880021163b352fa3db6">create</a> (const std::wstring &amp;file_name)</td></tr>
<tr class="memdesc:a51efae0b241af880021163b352fa3db6"><td class="mdescLeft">&#160;</td><td class="mdescRight">创建一个纹理 根据图片的名字  <a href="#a51efae0b241af880021163b352fa3db6">更多...</a><br /></td></tr>
<tr class="separator:a51efae0b241af880021163b352fa3db6"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected 成员函数</h2></td></tr>
<tr class="memitem:a91475e8c2db179e5ed98094f6841d60a"><td class="memItemLeft" align="right" valign="top"><a id="a91475e8c2db179e5ed98094f6841d60a"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sky_engine2d_1_1_texture2_d.html#a91475e8c2db179e5ed98094f6841d60a">Texture2D</a> ()</td></tr>
<tr class="memdesc:a91475e8c2db179e5ed98094f6841d60a"><td class="mdescLeft">&#160;</td><td class="mdescRight">无参数构造器 <br /></td></tr>
<tr class="separator:a91475e8c2db179e5ed98094f6841d60a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acb7703b00956a8be0bdafcc8bc45ad4d"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sky_engine2d_1_1_texture2_d.html#acb7703b00956a8be0bdafcc8bc45ad4d">initWithFile</a> (const std::wstring &amp;file_name)</td></tr>
<tr class="memdesc:acb7703b00956a8be0bdafcc8bc45ad4d"><td class="mdescLeft">&#160;</td><td class="mdescRight">通过图片文件初始化纹理  <a href="#acb7703b00956a8be0bdafcc8bc45ad4d">更多...</a><br /></td></tr>
<tr class="separator:acb7703b00956a8be0bdafcc8bc45ad4d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
友元</h2></td></tr>
<tr class="memitem:a27f947643431e5bd7f186f4b376a0b61"><td class="memItemLeft" align="right" valign="top"><a id="a27f947643431e5bd7f186f4b376a0b61"></a>
class&#160;</td><td class="memItemRight" valign="bottom"><b>TextureCache</b></td></tr>
<tr class="separator:a27f947643431e5bd7f186f4b376a0b61"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>2D纹理 </p>
</div><h2 class="groupheader">成员函数说明</h2>
<a id="a51efae0b241af880021163b352fa3db6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a51efae0b241af880021163b352fa3db6">&#9670;&nbsp;</a></span>create()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static Texture2DSharedPtr SkyEngine2d::Texture2D::create </td>
          <td>(</td>
          <td class="paramtype">const std::wstring &amp;&#160;</td>
          <td class="paramname"><em>file_name</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>创建一个纹理 根据图片的名字 </p>
<p>图片支持JPG、PNG ，当该文件之前已经创建过纹理 这个 直接从 纹理缓存中获取纹理 </p><dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">const</td><td>std::wstring &amp; file_name 图片的名字 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>Texture2DSharedPtr 纹理指针 </dd></dl>

</div>
</div>
<a id="a4314457f37876bfd38036f51e97eb681"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4314457f37876bfd38036f51e97eb681">&#9670;&nbsp;</a></span>getContentSize()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="class_sky_engine2d_1_1_size.html">Size</a>&amp; SkyEngine2d::Texture2D::getContentSize </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>获取纹理的尺寸 </p>
<dl class="section return"><dt>返回</dt><dd><a class="el" href="class_sky_engine2d_1_1_size.html" title="尺寸">Size</a> </dd></dl>
<dl class="section see"><dt>参见</dt><dd>getContentRect() </dd></dl>

</div>
</div>
<a id="a1b794103412b7a8fe244707abc83f702"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1b794103412b7a8fe244707abc83f702">&#9670;&nbsp;</a></span>getD3dResourceComPtr()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">D3dResourceComPtr SkyEngine2d::Texture2D::getD3dResourceComPtr </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>获取 ID3D11Resource 对象 </p>
<dl class="section return"><dt>返回</dt><dd>D3dResourceComPtr </dd></dl>
<dl class="section see"><dt>参见</dt><dd><a class="el" href="class_sky_engine2d_1_1_texture2_d.html#a1b637535dd17079d4b795a13fe689c49" title="获取 ID3D11ShaderResourceView 对象">getD3dShaderResourceView()</a> </dd></dl>

</div>
</div>
<a id="a1b637535dd17079d4b795a13fe689c49"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1b637535dd17079d4b795a13fe689c49">&#9670;&nbsp;</a></span>getD3dShaderResourceView()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">D3dShaderResourceViewComPtr SkyEngine2d::Texture2D::getD3dShaderResourceView </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>获取 ID3D11ShaderResourceView 对象 </p>
<dl class="section return"><dt>返回</dt><dd>D3dShaderResourceViewComPtr </dd></dl>
<dl class="section see"><dt>参见</dt><dd><a class="el" href="class_sky_engine2d_1_1_texture2_d.html#a1b794103412b7a8fe244707abc83f702" title="获取 ID3D11Resource 对象">getD3dResourceComPtr()</a> </dd></dl>

</div>
</div>
<a id="acb7703b00956a8be0bdafcc8bc45ad4d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acb7703b00956a8be0bdafcc8bc45ad4d">&#9670;&nbsp;</a></span>initWithFile()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool SkyEngine2d::Texture2D::initWithFile </td>
          <td>(</td>
          <td class="paramtype">const std::wstring &amp;&#160;</td>
          <td class="paramname"><em>file_name</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>通过图片文件初始化纹理 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">const</td><td>std::wstring &amp; file_name 图片名字 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>bool 初始化是否成功 </dd></dl>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>C:/code/SkyGameEngine2d/src/render/<a class="el" href="_texture2_d_8h_source.html">Texture2D.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.15
</small></address>
</body>
</html>
